<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let arr = [1,1,3,8,7,3,2,5,2,1,4,3,9,3,6,9,10,8,3,8];

    let newArr=[];
    for (let i=0;i<arr.length;i++){
        if(newArr.indexOf(arr[i])<0){
            newArr.push(arr[i]);
        }
    }
    document.write(newArr);
</script>
</body>
</html>